﻿using NP.BPMReportPlatform.Entities.BPM_Platform;
using System;
using System.Collections.Generic;
using System.Text;

namespace NP.BPMReportPlatform.SF.Dto
{
    /// <summary>
    /// SF对接接口实体
    /// </summary>
    public class SFDto
    {
        /// <summary>
        /// SF岗位返回实体
        /// </summary>
        public class SFPositionRoleResponse
        {
            /// <summary>
            /// 岗位实体
            /// </summary>
            public class SFPositionRole
            {
                public SFPositionRoleResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFPositionRoleResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFPositionRoleData> results { get; set; }
            }

            /// <summary>
            /// 岗位数据
            /// </summary>
            public class SFPositionRoleData
            {
                public string code { get; set; }

                public string externalName_zh_CN { get; set; }

                /// <summary>
                /// 只要A的
                /// </summary>
                public string effectiveStatus { get; set; }

                public SFPositionRoleData parentPosition { get; set; }
            }
        }

        /// <summary>
        /// SF岗位-人员关系返回实体
        /// </summary>
        public class SFManageRoleResponse
        {
            /// <summary>
            /// 岗位-人员实体
            /// </summary>
            public class SFManageRole
            {
                public SFManageRoleResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFManageRoleResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFManageRoleData> results { get; set; }
            }

            /// <summary>
            /// 岗位-人员关系数据
            /// </summary>
            public class SFManageRoleData
            {
                /// <summary>
                /// 用户工号
                /// </summary>
                public string userId { get; set; }

                /// <summary>
                /// 上级主管工号
                /// </summary>
                public string managerId { get; set; }

                /// <summary>
                /// 岗位代码
                /// </summary>
                public string position { get; set; }

                public string emplStatus { get; set; }

                public EmploymentNav employmentNav { get; set; }
            }

            public class EmploymentNav
            {
               public string personIdExternal { get; set; }
            }
        }

        /// <summary>
        /// SF兼岗-人员关系返回实体
        /// </summary>
        public class SFPartManageRoleResponse
        {
            /// <summary>
            /// SF兼岗-人员实体
            /// </summary>
            public class SFPartManageRole
            {
                public SFPartManageRoleResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFPartManageRoleResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFPartManageRoleData> results { get; set; }
            }

            /// <summary>
            /// 岗位-人员关系数据
            /// </summary>
            public class SFPartManageRoleData
            {
                /// <summary>
                /// 用户工号
                /// </summary>
                public string externalCode { get; set; }

                /// <summary>
                /// 
                /// </summary>
                public SFAllProcess allSfProcesses { get; set; }
            }

            public class SFAllProcess
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFAllProcessData> results { get; set; }
            }

            public class SFAllProcessData
            {
                public string SecondaryAssignments_effectiveStartDate { get; set; }

                public UsersSysIdNav usersSysIdNav { get; set; }
            }

            public class UsersSysIdNav
            {
                public EmpInfo empInfo { get; set; }
            }

            public class EmpInfo
            {
                public JobInfoNav jobInfoNav { get; set; }
            }

            public class JobInfoNav
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFJobInfoNavData> results { get; set; }
            }

            public class SFJobInfoNavData
            {
                public string emplStatus { get; set; }
                public string position { get; set; }
            }
        }

        /// <summary>
        /// SFHRBP审批实体
        /// </summary>
        public class SFCommonApproverResponse
        {
            /// <summary>
            /// 通用角色实体
            /// </summary>
            public class SFCommonApprover
            {
                public SFCommonApproverResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFCommonApproverResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFCommonApproverData> results { get; set; }
            }

            /// <summary>
            /// 通用审批岗位
            /// </summary>
            public class SFCommonApproverData
            {
                /// <summary>
                /// 角色代码（示例：DOAHRBPHead，剩余代码待定）
                /// </summary>
                public string externalCode { get; set; }

                /// <summary>
                /// 岗位
                /// </summary>
                public string position { get; set; }

                /// <summary>
                /// 部门编码
                /// </summary>
                public string department { get; set; }
            }
        }

        /// <summary>
        /// SF部门负责人实体
        /// </summary>
        public class SFDepartLeaderResponse
        {
            /// <summary>
            /// 通用角色实体
            /// </summary>
            public class SFDepartLeader
            {
                public SFDepartLeaderResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFDepartLeaderResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFDepartLeaderData> results { get; set; }
            }

            /// <summary>
            /// 部门负责人
            /// </summary>
            public class SFDepartLeaderData
            {
                /// <summary>
                /// 开始日期
                /// </summary>
                public string startDate { get; set; }

                /// <summary>
                /// 结束日期
                /// </summary>
                public string endDate { get; set; }

                /// <summary>
                /// 部门编码
                /// </summary>
                public string externalCode { get; set; }

                /// <summary>
                /// 部门名称
                /// </summary>
                public string name_zh_CN { get; set; }

                /// <summary>
                /// 部门全路径
                /// </summary>
                public string cust_route { get; set; }

                /// <summary>
                /// 状态
                /// A活动；I非活动
                /// </summary>
                public string status { get; set; }

                /// <summary>
                /// 上级部门编码
                /// </summary>
                public string cust_DepartmentToDepartmentProp { get; set; }

                /// <summary>
                /// 负责人工号
                /// </summary>
                public string headOfUnit { get; set; }

                /// <summary>
                /// 组织类别
                /// </summary>
                public string cust_organizationCategory { get; set; }

                public HeadofunitNav headofunitNav { get; set; }
            }

            public class HeadofunitNav
            {
                public EmpInfo empInfo { get; set; }
            }

            public class EmpInfo
            {
                public string personIdExternal { get; set; }
            }
        }

        /// <summary>
        /// SF获取薪资员、行政、员工关系角色
        /// </summary>
        public class SFOtherResponse
        {
            /// <summary>
            /// 通用角色实体
            /// </summary>
            public class SFOther
            {
                public SFOtherResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFOtherResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFOtherData> results { get; set; }
            }

            /// <summary>
            /// 岗位数据
            /// </summary>
            public class SFOtherData
            {
                /// <summary>
                /// 本人工号
                /// </summary>
                public string userId { get; set; }

                /// <summary>
                /// 关系类型
                /// 薪资员 1936；行政2160；员工关系1938（此为测试机代码，正式机代码会不同）
                /// </summary>
                public string relationshipType { get; set; }

                /// <summary>
                /// 对象工号
                /// </summary>
                public string relUserId { get; set; }
            }
        }

        /// <summary>
        /// 通用角色Dto
        /// </summary>
        public class CommonRoleUserDto
        {
            /// <summary>
            /// 角色编码
            /// </summary>
            public string RoleCode { get; set; }

            /// <summary>
            /// 角色名称
            /// </summary>
            public string RoleName { get; set; }

            /// <summary>
            /// 组织编码
            /// </summary>
            public string DeptCode { get; set; }

            /// <summary>
            /// 用户编码
            /// </summary>
            public string UserCode { get; set; }
        }



        #region 合同模块相关

        /// <summary>
        /// SF 所属区域接口
        /// </summary>
        public class SFUserAreaResponse
        {
            /// <summary>
            /// SF兼岗-人员实体
            /// </summary>
            public class SFUserArea
            {
                public SFUserAreaResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFUserAreaResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFUserAreaData> results { get; set; }
            }

            /// <summary>
            /// 人员所属区域获取
            /// </summary>
            public class SFUserAreaData
            {
                /// <summary>
                /// 用户工号
                /// </summary>
                public string userId { get; set; }

                /// <summary>
                /// 所属区域代码
                /// </summary>
                public string customString21 { get; set; }

                /// <summary>
                /// 所属区域
                /// </summary>
                public CustomString customString21Nav { get; set; }
            }

            public class CustomString
            {
                /// <summary>
                /// 所属区域名称
                /// </summary>
                public string externalName { get; set; }
            }
        }

        /// <summary>
        /// SF 所属区域接口
        /// </summary>
        public class SFUserTimeSheetResponse
        {
            /// <summary>
            /// SF兼岗-人员实体
            /// </summary>
            public class SFUserTimeSheet
            {
                public SFUserTimeSheetResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFUserTimeSheetResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFUserTimeSheetData> results { get; set; }
            }

            /// <summary>
            /// 人员所属区域获取
            /// </summary>
            public class SFUserTimeSheetData
            {
                /// <summary>
                /// 员工编号
                /// </summary>
                public string externalCode { get; set; }

                /// <summary>
                /// 结转属性
                /// </summary>
                public string externalName { get; set; }

                /// <summary>
                /// 结束时间
                /// </summary>
                public string mdfSystemEffectiveEndDate { get; set; }

                /// <summary>
                /// 生效开始时间
                /// </summary>
                public string effectiveStartDate { get; set; }
            }
        }

        /// <summary>
        /// 甲方公司实体
        /// </summary>
        public class SFCorporateResponse
        {
            /// <summary>
            /// 甲方公司
            /// </summary>
            public class SFCorporate
            {
                public SFCorporateResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFCorporateResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFCorporateData> results { get; set; }
            }

            /// <summary>
            /// 具体数据
            /// </summary>
            public class SFCorporateData
            {
                /// <summary>
                /// 公司代码	
                /// </summary>
                public string externalCode { get; set; }

                /// <summary>
                /// 公司名称	 
                /// </summary>
                public string name_zh_CN { get; set; }

                /// <summary>
                /// 状态
                /// </summary>
                public string status { get; set; }

                /// <summary>
                /// 统一社会代码
                /// </summary>
                public string cust_unifiedSocialCreditCode { get; set; }

                /// <summary>
                /// 联系电话	
                /// </summary>
                public string cust_contactNumber { get; set; }

                /// <summary>
                /// 邮编
                /// </summary>
                public string cust_zipCode { get; set; }

                /// <summary>
                /// 注册地址	
                /// </summary>
                public string cust_registeredAddress { get; set; }

                /// <summary>
                /// 获取法人代表
                /// </summary>
                public string cust_legalRepresentative { get; set; }
            }
        }

        /// <summary>
        /// 员工绩效
        /// </summary>
        public class SFUserPerfResponse
        {
            /// <summary>
            /// 员工绩效实体
            /// </summary>
            public class SFUserPerf
            {
                public SFUserPerfResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFUserPerfResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFUserPerfData> results { get; set; }
            }

            /// <summary>
            /// 数据
            /// </summary>
            public class SFUserPerfData
            {
                /// <summary>
                /// 编码
                /// </summary>
                public string externalCode { get; set; }

                /// <summary>
                /// 日期
                /// </summary>
                public string effectiveStartDate { get; set; }

                /// <summary>
                /// 数据
                /// </summary>
                public SFUserPerfResultList cust_toPerformanceInfo { get; set; }
            }

            /// <summary>
            /// 子集
            /// </summary>
            public class SFUserPerfResultList
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFUserPerfResultData> results { get; set; }
            }

            /// <summary>
            /// 数据
            /// </summary>
            public class SFUserPerfResultData
            {
                /// <summary>
                /// 考核类型
                /// </summary>
                public string externalName { get; set; }

                /// <summary>
                /// 考核名称
                /// </summary>
                public string cust_name { get; set; }

                /// <summary>
                /// 年度
                /// </summary>
                public int? cust_year { get; set; }

                /// <summary>
                /// 结果
                /// </summary>
                public string cust_result { get; set; }
            }
        }

        /// <summary>
        /// 合同工作地
        /// </summary>
        public class SFContractAddressResponse
        {
            /// <summary>
            /// 员工绩效实体
            /// </summary>
            public class SFContractAddress
            {
                public SFContractAddressResult d { get; set; }
            }

            /// <summary>
            /// 中间结构
            /// </summary>
            public class SFContractAddressResult
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFContractAddressData> results { get; set; }
            }

            /// <summary>
            /// 数据
            /// </summary>
            public class SFContractAddressData
            {
                /// <summary>
                /// key
                /// </summary>
                public string id { get; set; }

                public SFContractAddressValues values { get; set; }
            }

            /// <summary>
            /// 子集
            /// </summary>
            public class SFContractAddressValues
            {
                /// <summary>
                /// 结果
                /// </summary>
                public List<SFContractAddressValuesData> results { get; set; }
            }

            /// <summary>
            /// 数据
            /// </summary>
            public class SFContractAddressValuesData
            {
                /// <summary>
                /// 编码
                /// </summary>
                public string externalCode { get; set; }

                /// <summary>
                /// 日期
                /// </summary>
                public string label_zh_CN { get; set; }

                /// <summary>
                /// A为有效，I为失效
                /// </summary>
                public string status { get; set; }
            }
        }

        public class SFContractPushResponse
        {
            public class SFContractPush
            {
                public List<SFContractPushData> d { get; set; }
            }

            public class SFContractPushData
            {
                public string status { get; set; }
                public string message { get; set; }
            }
        }

        public class SFRSZWBTPushResponse
        {
            public class SFRSZWBTPush
            {
                public List<SFRSZWBTPushData> d { get; set; }
            }

            public class SFRSZWBTPushData
            {
                public string status { get; set; }
                public string message { get; set; }
            }
        }

        #endregion
    }
}
